/**
 * 
 */
package com.py.credit.entity.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.py.credit.entity.common.OptionalColumn;

/**
 * @author zzf
 *
 */
public enum SgsCfExportEnum {
	
	
	A000001("A000001", "行政相对人名称", "varchar", "input", true, true, new HashMap<String, String>(), "CF", true, true,
			true),
	CF_XZXDRLB("CF_XZXDRLB", "行政相对人类别", "varchar", "input", true, true, new HashMap<String, String>(), "CF", true, true,
			true),
	A000002("A000002", "统一社会信用代码", "varchar", "input", true, false, new HashMap<String, String>(),
					"CF", true, true, true),
	A000003("A000003", "工商登记码", "varchar", "input", true, false,
							new HashMap<String, String>(), "CF", true, true, false), 
	A000004("A000004", "组织机构代码",
									"varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
									true, false),
	A000005("A000005", "税务登记号", "varchar", "input", true, false,
											new HashMap<String, String>(), "CF", true, true, false),
	CF_XDR_SYDW("CF_XDR_SYDW", "事业单位证书号", "varchar", "input", true, true, new HashMap<String, String>(), "CF", true, true,
			true), 
	CF_XDR_SHZZ("CF_XDR_SHZZ", "社会组织登记证号", "varchar", "input", true, false, new HashMap<String, String>(), "CF",
					true, true, false),
	
	CF_FDDB("CF_FDDB", "法定代表人姓名", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_FDDBRZJLX("CF_FDDBRZJLX", "法定代表人证件类型", "varchar", "input", true, false, new HashMap<String, String>(),
					"CF", true, true, false),
	CF_FDDBRZJHM("CF_FDDBRZJHM", "法定代表人证件号码", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	ZJLX("ZJLX", "证件类型", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	ZJHM("ZJHM", "证件号码", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_WSH("CF_WSH", "行政处罚决定书文号", "varchar", "input", true, true, new HashMap<String, String>(), "CF", true, true,
			true),
	CF_WFXW("CF_WFXW", "违法行为类型", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false),

	
	CF_SY("CF_SY", "违法事实", "varchar", "input", true, true, new HashMap<String, String>(), "CF", true, true,
			true),
	CF_YJ("CF_YJ", "处罚依据", "varchar", "input", true, true, new HashMap<String, String>(), "CF", true, true,
			true),
	CF_CFLB("CF_CFLB", "处罚类别", "varchar", "input", true, true, new HashMap<String, String>(), "CF", true, true,
			true),
	CF_NR("CF_NR", "处罚内容", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_NR_FK("CF_NR_FK", "罚款金额（万元）", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_NR_WFFF("CF_NR_WFFF", "没收违法所得、没收非法财物的金额（万元）", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_NR_ZKDX("CF_NR_ZKDX", "暂扣或吊销证照名称及编号", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_JDRQ("CF_JDRQ", "处罚决定日期", "timestamp", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_YXQ("CF_YXQ", "处罚有效期", "timestamp", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_GSJZQ("CF_GSJZQ", "公示截止期", "timestamp", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_CFJG("CF_CFJG", "处罚机关", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	CF_CFJGDM("CF_CFJGDM", "处罚机关统一社会信用代码", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false), 
	
	CF_SJLY("CF_SJLY", "数据来源单位", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false),
	CF_SJLYDM("CF_SJLYDM", "数据来源单位统一社会信用代码", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false),


	BZ("BZ", "备注", "varchar", "input", true, false, new HashMap<String, String>(), "CF", true,
			true, false);

	
	
	

	private String colNameEN;
	private String colNameCN;
	private String type;
	private boolean defaultShow;
	private String widget;
	private boolean fuzzy;
	private HashMap<String, String> widgetValue;
	private boolean searchIsShow;
	private String group;
	private boolean advanceConditionShow;
	private boolean webShow;

	private SgsCfExportEnum(String colNameEN, String colNameCN, String type, String widget, boolean defaultShow,
			boolean fuzzy, HashMap<String, String> widgetValue, String group, boolean advanceConditionShow,
			boolean searchIsShow, boolean webShow) {
		this.colNameEN = colNameEN;
		this.colNameCN = colNameCN;
		this.type = type;
		this.widget = widget;
		this.defaultShow = defaultShow;
		this.fuzzy = fuzzy;
		this.widgetValue = widgetValue;
		this.searchIsShow = searchIsShow;
		this.group = group;
		this.advanceConditionShow = advanceConditionShow;
		this.webShow = webShow;
	}

	public boolean isAdvanceConditionShow() {
		return advanceConditionShow;
	}

	public void setAdvanceConditionShow(boolean advanceConditionShow) {
		this.advanceConditionShow = advanceConditionShow;
	}

	public String getColNameEN() {
		return colNameEN;
	}

	public void setColNameEN(String colNameEN) {
		this.colNameEN = colNameEN;
	}

	public String getColNameCN() {
		return colNameCN;
	}

	public void setColNameCN(String colNameCN) {
		this.colNameCN = colNameCN;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public boolean isDefaultShow() {
		return defaultShow;
	}

	public void setDefaultShow(boolean defaultShow) {
		this.defaultShow = defaultShow;
	}

	public String getWidget() {
		return widget;
	}

	public void setWidget(String widget) {
		this.widget = widget;
	}

	public boolean isFuzzy() {
		return fuzzy;
	}

	public void setFuzzy(boolean fuzzy) {
		this.fuzzy = fuzzy;
	}

	public HashMap<String, String> getWidgetValue() {
		return widgetValue;
	}

	public void setWidgetValue(HashMap<String, String> widgetValue) {
		this.widgetValue = widgetValue;
	}

	public boolean isSearchIsShow() {
		return searchIsShow;
	}

	public void setSearchIsShow(boolean searchIsShow) {
		this.searchIsShow = searchIsShow;
	}

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	public boolean isWebShow() {
		return webShow;
	}

	public void setWebShow(boolean webShow) {
		this.webShow = webShow;
	}

	public static List<OptionalColumn> getOptionalColumns(String kId) {

		List<OptionalColumn> OptionalColumns = new ArrayList<OptionalColumn>();

		SgsCfExportEnum[] values = SgsCfExportEnum.values();

		for (SgsCfExportEnum value : values) {

			if (kId.equals(value.getGroup())) {

				OptionalColumn optionalColumn = new OptionalColumn(value.getColNameEN(), value.getColNameCN(),
						value.getType(), value.isDefaultShow(), value.getWidget(), value.isFuzzy(),
						value.getWidgetValue(), value.isSearchIsShow());
				OptionalColumns.add(optionalColumn);
			}

		}
		return OptionalColumns;

	}

	public static List<String> getDefaultShowColumnEN(String kId) {

		List<String> columns = new ArrayList<String>();

		SgsCfExportEnum[] values = SgsCfExportEnum.values();

		for (SgsCfExportEnum value : values) {

			if (value.getGroup().equals(kId)) {

				if (value.isDefaultShow()) {

					columns.add(value.getColNameEN());
				}
			}

		}
		return columns;

	}

	public static List<OptionalColumn> getAdvancedConditionColumns(String kId) {
		List<OptionalColumn> OptionalColumns = new ArrayList<OptionalColumn>();

		SgsCfExportEnum[] values = SgsCfExportEnum.values();

		for (SgsCfExportEnum value : values) {

			if (kId.equals(value.getGroup())) {

				if (value.isAdvanceConditionShow()) {

					OptionalColumn optionalColumn = new OptionalColumn(value.getColNameEN(), value.getColNameCN(),
							value.getType(), value.isDefaultShow(), value.getWidget(), value.isFuzzy(),
							value.getWidgetValue(), value.isSearchIsShow());
					OptionalColumns.add(optionalColumn);
				}
			}

		}
		return OptionalColumns;
	}

	public static List<String> getDefaultShowColumnENForOuterWeb(String kId) {
		List<String> columns = new ArrayList<String>();

		SgsCfExportEnum[] values = SgsCfExportEnum.values();

		for (SgsCfExportEnum value : values) {

			if (value.getGroup().equals(kId)) {

				if (value.isWebShow()) {

					columns.add(value.getColNameEN());
				}
			}

		}
		return columns;
	}

}
